package com.example.demo.controller;

import com.example.demo.domain.Video;
import com.example.demo.service.VideoService;
import com.example.demo.service.utils.JsonData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * Video
 *
 * @author dmc 2020/7/30 13:53
 * @version 1.0
 */

@RestController
@RequestMapping("/api/v1/pub/Video")
public class VideoController {

    @Autowired
    private VideoService videoService;

    @GetMapping("list")
    public Object list(){


        List<Video> list = videoService.listVideo();

        return JsonData.buildSuccess(list);
    }


}
